package com.skyrhyme;

import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONUtil;
import com.skyrhyme.market.utils.RSAUtils;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.ArrayList;
import java.util.HashMap;


public class TemplateQuery {
    public static void main(String[] args) {
        HashMap<String, Object> map = new HashMap<>();
        map.put("appKey", "4775098");
        map.put("timestamp", "2025-09-08 15:31:00");
        map.put("commodityIds", new ArrayList<>().add("730"));
        map.put("sign", "VgY2NKs1il0zDbphcTA2h7U5Ib4cpwnlusRrnVfLMXLwgDdGhg13KK75y5a9xRSQPAXjycp7FhPf2GE3Je+TXxfOLsADg2+/UO3q9bZ9SSTe+vTh7c9DuPjwchSQarDiz+ccr/2mL0f039vH9UfTrfd5pFE66UPL7GizyVARWdGUwMu6z9GCVxS/u4ln7Xe6/+C8lWL5NlIcm9CK4BVeMKEWIuHWwtpHhtsnJXihEwPUCt2vLgRzqgf9hu8WGrlfdGxCYLELDrQvtYjNT0KDyvyPINiKaDGA7eUi8mpBMNd1L/xIn5yo5YxanKhCel/8fDWV8fkNm8WI3XMGCz/VPQ==");
        String jsonStr = JSONUtil.toJsonStr(map);

        String body = HttpRequest.post("https://gw-openapi.youpin898.com/open/v1/api/queryViewChart")
                .body(jsonStr).execute().body();


        System.out.println(body);
    }
}
